//时间戳转化函数
const timeTrans = (time:any, type:any) => {
  let date:Date = new Date(new Date(time).getTime() + 8 * 3600 * 1000);
  let _date:string = date.toJSON();
  if (type === 1) {
    _date = _date.substring(0, 10);
  } else {
    _date = _date.substring(0, 19).replace("T", " ");
  }
  return _date;
};

//使用     render: (text) => <span>{timeTrans(text, 0)}</span>,
export default timeTrans;
